<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Customer')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-customer_id" data-rule="required" data-source="clothmaking_customer/index"  data-field="customer_name" class="form-control selectpage" name="row[customer_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Customer_demand_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-customer_demand_id" data-rule="required" data-source="customer_demand/getCustomerDemandByCustomerId" data-multiple="true"  data-field="name" class="form-control selectpage" name="row[customer_demand_id]" type="text" value="">
        </div>
    </div>
            <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">客户需求:</label>
        <div class="col-xs-12 col-sm-8">
            <table id="customer-demand-table">
            </table>
            <input type="hidden" id="c-customer_demand_quantity" name="row[customer_demand_quantity]">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-remark" class="form-control " rows="5" name="row[remark]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Limiteddate')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-limitedDate" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[limitedDate]" type="text" value="{:date('Y-m-d')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Customer_require')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-customer_require" data-rule="required" class="form-control" name="row[customer_require]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Img_address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-img_address" class="form-control" size="50" name="row[img_address]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span>
                        <button type="button" id="plupload-img_address" class="btn btn-danger plupload" 
                                data-input-id="c-img_address" 
                                data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" 
                                data-multiple="false" 
                                data-preview-id="p-img_address">
                            <i class="fa fa-upload"></i> {:__('Upload')}
                        </button>
                    </span>
                    <span>
                        <button type="button" id="fachoose-img_address" class="btn btn-primary fachoose" 
                                data-input-id="c-img_address" 
                                data-mimetype="image/*" 
                                data-multiple="false">
                            <i class="fa fa-list"></i> {:__('Choose')}
                        </button>
                    </span>
                </div>
                <span class="msg-box n-right" for="c-img_address"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-img_address"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Pdf_address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-pdf_address" class="form-control" size="50" name="row[pdf_address]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span>
                        <button type="button" id="plupload-pdf_address" class="btn btn-danger plupload" 
                                data-input-id="c-pdf_address" 
                                data-mimetype="application/pdf" 
                                data-multiple="false" 
                                data-preview-id="p-pdf_address">
                            <i class="fa fa-upload"></i> {:__('Upload')}
                        </button>
                    </span>
                    <span>
                        <button type="button" id="fachoose-pdf_address" class="btn btn-primary fachoose" 
                                data-input-id="c-pdf_address" 
                                data-mimetype="application/pdf" 
                                data-multiple="false">
                            <i class="fa fa-list"></i> {:__('Choose')}
                        </button>
                    </span>
                </div>
                <span class="msg-box n-right" for="c-pdf_address"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-pdf_address"></ul>
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Quantity')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quantity" data-rule="required" class="form-control" name="row[quantity]" type="number">
        </div> -->
    <!-- </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Outbound_status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[outbound_status]', ['已出库'=>__('已出库'), '未出库'=>__('未出库'), '部分出库'=>__('部分出库')], '未出库')}
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remaining_quantity')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remaining_quantity" data-rule="required" class="form-control" name="row[remaining_quantity]" type="number" value="0">
        </div>
    </div> -->
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
